% /*******************************************************************************
%  * Print Multiplication
%  * *****************************************************************************
%  * Print out the number as binary format to file
%  * 
%  * @param x             Input Number in [0,1)
%  * @param bits_to_left  
%  * @param bits_to_right 
%  * @param out_file      File to write out
%  */
function disp_mult(a, b, c, z_est, z_est_r, z_r, z, m, n, r, k, fid)
%print separator
separator  = repmat('-', 1, m+n);

%print Multiplicand and Multiplier
bin_a = bin2str(a, 0, m);
bin_b = bin2str(b, 0, n);
fprintf(fid, '%*s\n', m+n, bin_a);
fprintf(fid, '%*s\n', m+n, bin_b);

%print separator
fprintf(fid, '%*s\n', m+n, separator);

%print PP Matrix
zstr = repmat('0', 1, m);
for j = n:-1:1 
    if(bin_b(j) == '0')
        fprintf(fid, '%*s\n', (m+j), zstr); 
    else
        fprintf(fid, '%*s\n', (m+j), bin_a);
    end
end

%print c
fprintf(fid, '%*s\n', r+k, bin2str(c, 0, r+k));

%print separator
fprintf(fid, '%*s\n', m+n, separator);

%print product
fprintf(fid, '%*s\n', r+k, bin2str(z_est, 0, r+k));
fprintf(fid, '%*s\n', r, bin2str(z_est_r, 0, r));
fprintf(fid, '%*s\n', r, bin2str(z_r, 0, r));
fprintf(fid, '%*s\n', m+n, bin2str(z, 0, m+n));
fprintf(fid, '%*s%*s\n', m+n, separator, m+n, separator);
end